//
//  BurglarModel.m
//  KEREN
//
//  Created by MW on 2023/4/27.
//

#import "BurglarModel.h"

@implementation BurglarModel
+ (instancetype)initWithDictionary:(NSDictionary *)jsonDic{
    BurglarModel *model = [[super alloc] init];
    [model setValuesForKeysWithDictionary:jsonDic];
    if(model.ebike_image){
        if([model.ebike_image hasPrefix:@"http"]){
            model.ebike_image  = jsonDic[@"ebike_type_image"];
        }else{
            model.ebike_image = [NSString stringWithFormat:@"%@%@",BaseimageUrl,model.ebike_image];
        }
        model.ebike_image = [model.ebike_image stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
    }
    return model;
}
-(id)valueForUndefinedKey:(NSString *)key
{
    return nil;
}
-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}

@end
